home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
bbs
/
con_005c.zip
/
CONCORD.RAR
/
SELECT.DOC
< prev
next >
Wrap
Text File
|
1997-04-25
|
20KB
|
586 lines
Copenhagen 16. December 1994
How to make a "Selection menu" in Concord step by step.
By Bjarke V. Lindberg
Fido 2:235/335
InterNet bjarke@ibm.net.dk
One of the strongest features in the new BBS software named Concord, is
the possibility to make "Selection menus". It means that the user only
has to use the cursor keys to highlight a menu item and then press Enter
to select it! At the first look, this may seem a little confusing but
when you get used to it, you'll see how logical it is.
This is a "step by step" example on making a selection menu in Concord.
There are many ways to do this but I find this way to be the easiest.
You'll probably find another way to do it when you get familiar with the
menu editor in Concord but until then you can do it my way.
Beside you now, you should have the Concord documents, the file called
MENUTYPE.DOC and the file called MACROS.DOC. I'll not explain you all
the macros and ^-codes, you have to read these documents by yourself ;-)
Before you start:
You'll have to make some thoughts about what the menu should do. For a
start you can try to use the sample menus that came with your Concord
package. They include some of the most used options in Concord (and
other BBS systems as well), but there are tons of options in Concord,
and the examples are just the most ordinary items.
You'll also have to have an ANSI drawing package. I'm using "The draw",
but there are also other packages available. If you're using "The draw"
you must accept, that you cannot make "Hidden" menu items, because "The
draw" "pack" the ansi file, and in the hidden menu item option, the
"["-bracket HAS to be the first character in the line. If you are
familiar with ansi-codes, you can use for example "Q-edit". (Pasi, the
author of Concord, maked all the example ansi's in this editor!).
These programs mentioned here, are all shareware, remember to register
your shareware programs, if you keep using them after the evaluation
period!
When I'm making menus in Concord, I can't do it without a printer, so in
this example, I assume that you have a printer attached to your
computer.
Another good thing to do before you start, is to make some batch files.
Currently I have three of them:
C.BAT:
@ECHO OFF
D:
CD\CONCORD
CONCORD -L -USYSOP;<PASSWORD>
This one "emulate" an IEMSI login in local mode, and you don't have to
enter your name and password.
M.BAT
@ECHO OFF
D:
CD\CONCORD\MENUPATH
CSETUP MENU
This one change the path to where you have your menu-files, and starts
up the menu editor. I assume that you have the concord main directory in
your "set path=" statement in your AUTOEXEC.BAT file. (As well as the
"SET CONCORD=DRIVE:\PATH")
A.BAT
@ECHO OFF
D:
CD\CONCORD\ANSIPATH
D:\T\TD\THEDRAW.EXE TESTMENU.ANS
This one change the path to where you have your ansi-files, and starts
up "The draw" with the ansi file belonging to the menufile you're
currenly working on.
It's not necessary for your to have these batch files, it just speeds up
the way you make the menus. (If you're doing it like I do) From now on
when I write C.BAT, it means that you should log in locally.
OK! Let's start making a menu:
Start M.BAT, and go to the TOP.MNU. Add an menu item called "+". Make it
show an ansi file with the "Press ENTER to continue"
(General | Show ansi file w/ Enter) It should show the ansi file
TESTANSI.ANS
* STEP 1 *
A.BAT { Start up The Draw in your ANSI dir. }
{ It'll write "File not found" the first }
{ time; ignore this. }
Draw a menu! The good thing about Concord is, that you can make what you
want. Don't be boring, make your menus different than other BBS's.
One of the things I don't like when loggin in other BBS's, is that I can
see which BBS-software they are using! Concord is so flexible, that you
can personalize it as much as you want. There are, for an example, not an
hardcoded welcome sequence in Concord... You can personalize it by
editing the Welcome.scr.
If you're using frames around your menus, you can make a macro name a
fixed length by adding a ".XX" after the macro name. E.g.
"@PACKER_NAME@.10" will reserve 10 characters for the name of the
selected packer, even though the packer name only are 3 characters long
f.ex. "ARJ", Concord will expand it to "ARJ ".
When your're finished drawing your menu, save it AS A BLOCK! Name it
TESTANSI.ANS
* STEP 2 *
C.BAT (log in locally)
Press "+" in the top menu, to be sure Concord write your ansi as you
imagined. If you used frames, see how many spaces you should add/delete
to make it look allright.
repeat step 1 - 2 until you're satisfied.
* STEP 3 *
A.BAT
Save the ansi as the real ansi name. (Remember use a block!)
Press the <prt Sc> (Print screen), and wait untill the printer is
finished.
Take your printed menu, get a pencil - move the cursor to the starting
character where the highligted box should show up. Write down the cursor
position on the paper.
It should look like this on the paper:
──────────────────────── Block this and print it out ───────────────────
┌──────────────────────────
│ 8 <─┬── Written by you with the pencil..
│ | <─┘
│ ┌──────────────────────────────────────┐
│ 3── │Menu Item 1 │
│ 4── │Menu Item 2 : @SysOp@.04 │
│ 5── │Menu Item 3 : @ADDRESS1@.25│
│ └─────────────────────────── ──────────┘
│ |
│ 22
│ │
├──────────────────┘
│
Written by you with the pencil
───────────────────────── We'll use it later on ─────────────────────────
As you can see at the example above, the first menu item starts at
position 8,4 - the second at position 8,5 - The @SYSOP@ macro starts at
22,4 - and so on....
We have to do it this way, until Pasi adds an ruler in the Menu editors
<F2> menu, but belive me - he has enough to do!!
* STEP 4 *
M.BAT
Add a new menu. (Press "N")
Name it TESTMENU.ANS
Add an item with the "Aut" in the first colomn. (KEY) It is per default.
The next colomn (INPUT) should contain a "#".
In the MENUTYPE colomn (column 3), set in the "Show ANSI w/ hotkeys"
It's located in the "General | Show ANSI w/ hotkeys".
In the DATAFIELD colomn (column 4) write the name of your ansi file. NB!
without path and extension!! Remember you have told Concord once where
to find it's ansi's - in the language file setup..
What we're doing above, is to tell Concord that it automaticly should
show our newly created ansi file, when it loads this menu.
All in all it should look like this:
┌────┬──────────┬───────────────────────────┬───────────────────────────┬───
│KEY │ INPUT │ MENUTYPE │ DATAFIELD │ SEC
├────┼──────────┼───────────────────────────┼───────────────────────────┼───
│Aut │ # │ Show ANSI w/ hotkeys │ MENUFILE.ANS │ 0
These were the easy steps... Next we'll make the selections...
* STEP 5 *
Before we make the selections, I'll try to explain the way Concord
handles the selection menus.
One selection item consists of three lines in the menu editor.
The 1st line tells Concord what to do when the user press Enter on it.
The 2nd line tells Concord what the line should look like, when it is
highlighted.
The 3rd line tells Concord what the line should look like, when it has
been highlighted once and is not anymore. In a other way: How should it
look like when the user leaves that field. (This should look like it
did when you drawed it the first time)
The two most used ^-codes in the selections is ^C, ^G and ^L.
^C means what color concord should draw/write (Just like in the .lng
files.)
Syntax: ^Cforeground,background;Text
Example: ^C4,0;Hello World
This writes "Hello World" with red foreground color and black
background color.
Color codes:
┌───────┬──────┬─────┬──────┬──────┬─────────┬──────┬───────┐
Foreground/ │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │
Background │ Black │ Blue │Green│ Cyan │ Red │ Magenta │Brown │ Light │
│ │ │ │ │ │ │ │ gray │
└───────┴──────┴─────┴──────┴──────┴─────────┴──────┴───────┘
┌───────┬──────┬─────┬──────┬──────┬─────────┬──────┬───────┐
│ 8 │ 9 │ 10 │ 11 │ 12 │ 13 │ 14 │ 15 │
Only │ Dark │Light │Light│ Light│ Light│ Light │Yellow│ White │
Foreground │ gray │blue │green│ Cyan │ red │ Magenta │ │ │
└───────┴──────┴─────┴──────┴──────┴─────────┴──────┴───────┘
^G means where the cursor should goto and start write. (I always
remember this by saying to myself: ^Goto)
Syntax: ^GX,Y;Text
Example: ^G12,10;Hello world
This will write "Hello World" starting 12 characters to the
right, and 10 characters down from the upper-left corner of the
screen.
A screen is 80 characters wide and 25 characters high.
^L means the length of an enter field.
Syntax: ^LXX;
Example: ^L10;
This sets the length of an enter field to 10. The user can
enter up till 10 characters in the field.
You can combine the ^-codes, but remember every ^-code ends with a ";".
Example: ^C4,0;^G12,10;Hello World
This combine the first two examples above.
Or : ^C15,1;^G12,10;Enter your first name :^C14,1;^L10;
This gives the user a field of 10 characters to enter his name.
There are three ways an user can make a selection.
1. The user selects the item, and Concord do something. (E.g Goto Menu,
Run a script, Select Language, etc.)
Yeah... I know "Select Language" is a combination of "Edit user
info" and the datafield "Language". I'll get back to this
later.
2. The user selects the item, and Concord TOGGLES a setting. (E.g. "Edit
user info" | "FILECHK")
3. The user selects the item, and Concord should read in some
information from the user. (E.g "Edit user info" | "ADDRESS1")
* STEP 6 *
Remembering our first example with the three menu items and the pencil,
we'll try to make a selection of this.
Menu Item 1
The item should load the "Setup menu".
Goto your new menu, it still looks like this:
KEY │ INPUT │ MENUTYPE │ DATAFIELD │ SEC
Aut │ # │ Show ANSI w/ hotkeys │ TESTMENU.ANS │ 0
Now we have to define, what Concord shall do; it shall goto the setup
menu, when the user press the enter.
Ok, let's tell Concord that.
Add a line in the menu editor. (Press <INS>)
KEY │ INPUT │ MENUTYPE │ DATAFIELD │ SEC
Aut │ # │ Show ANSI w/ hotkeys │ TESTMENU.ANS │ 0
Sel │ $ │ Gosub menu │ SETUP │ 0
│ │ │ │
│ └───────────┐ └───────────────┐ └──────────┐
┌─┴────────────┐ ┌─┴───────────────┐ ┌─┴────────────────┐ ┌┴──────────────┐
│Press ALT-M │ │Press ALT Gr-"4" │ │ General | Gosub │ │ Name of the │
│in this field.│ │ │ │ menu │ │ menu to goto │
│This means │ └─────────────────┘ └──────────────────┘ └───────────────┘
│Concord will │
│react on an │
│press on enter│
└──────────────┘
Next we have to tell Concord WHERE the cursor have to be when it shall
react on the press on the Enter:
KEY │ INPUT │ MENUTYPE │ DATAFIELD │ SEC
Aut │ # │ Show ANSI w/ hotkeys │ TESTMENU.ANS │ 0
Sel │ $ │ Gosub menu │ SETUP │ 0
│ £ │ Quit │ ^G8,3;^C15,1;Menu Item 1^C│ 0
│ │ │ │
│ └───────────┐ └───────────────┐ └──────────┐
┌─┴────────────┐ ┌─┴───────────────┐ ┌─┴────────────────┐ │
│Press ALT-C │ │ Press ALT Gr-"3"│ │ Don't change this│ │
│here. It tells│ └─────────────────┘ └──────────────────┘ │
│Concord that │┌─────────────────────────────────────────┬┘
│it's a cursor ││ ^G8,3;^C15,1;Menu Item 1^CN,N;^GN,N; │
│selection. │└─────────────────────────────────────────┘
└──────────────┘
The data field is the problem here, but if you only know how to read
it, it's no problem at all. I'll explain it here, but afterwards you'll
have to "uncode"it yourself :-)
^G8,3; -> Goto position 8,3. It's here our menu items
starts. (As we wrote on the paper)
^C15,1; -> Set the color to white foreground and blue
background. (It's highlighted)
Menu Item 1 -> Exactly the same text as we wrote in our
menu. (It will overwrite the menu text, but
with the new colors)
^CN,N; -> Set the fore- and background color back to
default.
^GN,N; -> Set the cursor to its default location.
Now we have highlighted the item. Next we have to "un-highlight" it, so
it looks like the same text we drawed in our menu, when the user press
the cursor key to highlight the next item.
The easiest way to do this, is to press the nummeric "+" key. It will
copy the line, we just wrote, to a buffer. Then press the nummeric
"*" key, and we will copy the line in the buffer to a new line in the
menu editor.
The only thing we have to do then, is to edit the color codes to fit the
ones the original menu item had.
KEY │ INPUT │ MENUTYPE │ DATAFIELD │ SEC
Aut │ # │ Show ANSI w/ hotkeys │ TESTMENU.ANS │ 0
Sel │ $ │ Gosub menu │ SETUP │ 0
│ £ │ Quit │ ^G8,3;^C15,1;Menu Item 1^C│ 0
│ £ │ Quit │ ^G8,3;^C9,0;Menu Item 1^CN│ 0
│
┌────────────────────────────────────────────────────┘
│
└─ ^G8,3;^C9,0;Menu Item 1^CN,N;^GN,N;
You've just maked your first selection!
* STEP 7 *
Exit the TESTMENU.ANS, and load in the TOP.ANS in the menu editor. Add
a "Goto Menu" item, and make it call TESTMENU.MNU.
Exit the menu editor.
* STEP 8 *
C.BAT
Enter the TESTMENU.MNU. Now the "Menu Item 1" should be highlighted. Try
to press Enter, and Concord will load the SETUP.MNU
That's it 'n' that's that ;-)
* STEP 9 *
Menu Item 2.
Here the user can toggle, if he's a SysOp or Not. (Not very realistic
but..... );-)
M.BAT
Open the TESTMENU.MNU
Start by adding a line in the buttom. Make it an selectable by pressing
ALT-M in the KEY column. Enter "$" in the INPUT column. (ALT Gr-"4")
In the MENUTYPE column select "Other | Edit user info".
In DATA column write SYSOP (The setting we are going to toggle)
Add a new line. The KEY column should be empty (ALT-C - remember??)
The INPUT column should contain a "£" (ALT Gr-"3")
There should be noting in the MENUTYPE column (Quit)
In the data field we have to tell Concord what to write. But the fact
that it's an toggle menu, and the @SYSOP@ macro can be changed, we have
to make it write the current status of this macro too.
It should look like this:
^G8,4;^C15,1;Menu Item 2^C9,0;^G22,4;@SYSOP@.04^CN,N;^GN,N;
Try to look at it, the difference is not that big compared to the first
example, the only new thing is that we tell Concord to write the @SYSOP@
macro too (whith the original colors), because this can change while
we're in the menu.
Copy the line to the buffer ("+"), and copy it to a new line ("*").
Change the colors to the originals:
^G8,4;^C9,0;Menu Item 2^C9,0; : @SYSOP@.04^CN,N;^GN,N;
Repeat STEP 8
That's it 'n' that's that ;-)
* STEP 10 *
Menu Item 3 ; This is the different one..
Here the user should enter the first line in his/her address.
M.BAT
Open the TESTMENU.MNU
Start by adding a line in the button. Make it an selectable by pressing
ALT-M in the KEY column. Enter "$" in the INPUT column. (ALT Gr-"4")
In the MENUTYPE column select "Other | Edit user info".
Here I need to explain what the datafield should contain, 'cause it
may sound a little confusing.
ADDRESS1 -> The setting we're going to change.
^G22,5; -> Where shall the input field show up?
^C15,1; -> The color of the input field
^L25; -> The lenght of the input field
This is the first half of the data field. You have to know, that Concord
will pause and wait for an input after the ^L-code. This means, that
until now, we've defined where the input field shall show up, what color
it has and the length of it. Concord is now waiting for the user to enter
the information and press the Enter key.
The next half is were we define what Concord shall do when the user has
pressed the Enter key.
^G22,5; -> Go back to we're the macro starts
^C9,0; -> Change the color to normal
@ADDRESS1@.25 -> Write the new entered information
The data line should look like this when it's done:
ADDRESS1 ^G22,5;^C14,1;^L25;^G22,5;^C9,0;@ADDRESS1@.25^CN,N;^GN,N;
It may sound a little confusing, but as i wrote before, when you know
what to do, it very easy.
Add a new line. The KEY column should be empty (ALT-C - remember??)
The INPUT column should contain a "£" (ALT Gr-"3")
There should be noting in the MENUTYPE column (Quit)
In the data field we have to tell Concord what to write. But the fact
that it's a item that can be changed while the user is in the menu, we
have to make it write the current status of this macro too.
Like this:
^G8,5;^C14,1;Menu Item 3^C9,0; :^G22,5;@ADDRESS1@.25^CN,N;^GN,N;
Copy the line to the buffer ("+"), and copy it to a new line ("*").
Change the colors to the originals:
^G8,5;^C9,0;Menu Item 3^C9,0; :^G22,5;@ADDRESS1@.25^CN,N;^GN,N;
Repeat STEP 8
That's it 'n' that's that ;-)
* STEP 11 *
You've now maked a selection menu. It wasn't hard or what?? I'll say,
that it's the two first menus you make that will take the longest time.
When you're in it, you can do it without thinking at all. And off course
your BBS looks much better with the selection menus :-)
I hope you'll enjoy using Concord. I do! In my opinion it's the best and
most flexible BBS software I've ever seen.
If you have any questions, just write your local support site. All of
them would be glad to help you.
If you have any comments to this document, please write me a E-mail.
Kind regards,
Bjarke V. Lindberg
Fido : 2:235/335
Internet : bjarke@ibm.net.dk
<EOF>